package xcmg.device.dao.mapper;

import java.math.BigDecimal;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import xcmg.device.service.vo.report.*;
import xcmg.device.service.vo.sale.AgentSalesOutDetailVO;
import xcmg.device.service.vo.sale.ThreeGuaranteesReportParam;
import xcmg.device.service.vo.sale.ThreeGuaranteesReportVO;

@Mapper
public interface ReportMapper {
    List<SaleReportVO> saleReportListV2(SaleReportParam reportParam);

    List<SaleReportVO> saleReportList(SaleReportParam reportParam);

    Integer saleReporCount(SaleReportParam reportParam);

    List<InventoryFlowVO> inventoryFlow(InventoryFlowParam inventoryFlowParam);

    Integer inventoryFlowCount(InventoryFlowParam inventoryFlowParam);

    List<LibraryAgeVO> libraryAge(LibraryAgeParam libraryAgeParam);
    
    BigDecimal libraryAgeQuantity(InventoryOverstockParam condition);

    Integer libraryAgeCount(LibraryAgeParam libraryAgeParam);

    List<DeliveryNoteWarnVO> deliveryNoteWarnList(DeliveryNoteWarnParam deliveryNoteWarnParam);

    Integer deliveryNoteWarnCount(DeliveryNoteWarnParam deliveryNoteWarnParam);

    List<InstructionWarnVO> instructionsWarn(InstructionWarnParam instructionWarnParam);

    Integer instructionsWarnCount(InstructionWarnParam instructionWarnParam);

    List<DealerPlanVO> dealerPlanList(DealerPlanVO condition);

    int dealerPlanListCount(DealerPlanVO condition);

    List<InventoryWarning> inventoryWarningList(InventoryWarning condition);

    int inventoryWarningListCount(InventoryWarning condition);

    List<DealerArapVO> dealerArapList(DealerArapVO condition);

    int dealerArapListCount(DealerArapVO condition);

    List<InventoryOverstockVO> inventoryOverstock(InventoryOverstockParam inventoryOverstockParam);

    Integer inventoryOverstockCount(InventoryOverstockParam inventoryOverstockParam);

    List<UnsoldVO> unsoldList(UnsoldVO condition);

    int unsoldListCount(UnsoldVO condition);

    List<DealerInOutVO> dealerInOutList(DealerInOutVO condition);

    int dealerInOutListCount(DealerInOutVO condition);

    List<ThreeGuaranteesReportVO> threeOutReport(ThreeGuaranteesReportParam threeGuaranteesReportParam);

    int threeOutReportCount(ThreeGuaranteesReportParam threeGuaranteesReportParam);

	List<SaleCompareVO> saleCompareList(SaleCompareVO condition);

    SaleCompareVO saleCompareTotal(SaleCompareVO condition);

    IndicatorTotalVO indicatorTotal(IndicatorVO condition);

    List<IndicatorDealerClassVO> indicatorDealerClassList(IndicatorVO condition);

    List<IndicatorMaterialTypeVO> indicatorMaterialTypeList(IndicatorVO condition);

    List<PurchaseReportVO> purchaseReportList(PurchaseReportVO condition);

    int purchaseReportListCount(PurchaseReportVO condition);

    List<PlanningAccuracyVO> planningAccuracy(PlanningAccuracyParam planningAccuracyParam);

    List<TimePeriodPurchaseSituationVO> timePeriodPurchaseSituation(TimePeriodPurchaseSituationParam timePeriodPurchaseSituationParam);

    TimePeriodPurchaseSituationVO timePeriodPurchaseSituationTotal(TimePeriodPurchaseSituationParam timePeriodPurchaseSituationParam);

    List<PurchaseAmountAnalysisVO> purchaseAmountAnalysis(PurchaseAmountAnalysisVO param);

    PurchaseAmountAnalysisVO purchaseAmountAnalysisTotal(PurchaseAmountAnalysisVO param);

    List<MissingVO> missingDispatcher(MissingVO missingVO);

    List<MissingVO> missingAgent(MissingVO missingVO);

    List<MissingVO> missingOrderType(MissingVO missingVO);

    List<MissingVO> missingMaterialOwnership(MissingVO missingVO);

    List<OrderSatisfyRateVO> orderSatisfyRate(OrderSatisfyRateParam param);

    List<OrderSatisfyRateVO> orderSatisfyRateMaterialsType(OrderSatisfyRateParam param);

    List<OrderSatisfyRateVO> orderSatisfyRatePurchaseGroup(OrderSatisfyRateParam param);

    List<OrderSatisfyRateVO> orderSatisfyRateSupplierName(OrderSatisfyRateParam param);

    void batchInsertMissingAnalysis(List<MissingVO> list);

    List<MissingVO> missingReportDispatcher(MissingVO missingVO);

    List<MissingVO> missingReportAgent(MissingVO missingVO);

    List<MissingVO> missingReportOrderType(MissingVO missingVO);

    List<MissingVO> missingReportMaterialOwnership(MissingVO missingVO);

    int deleteMissingAnalysis(@Param("orgId") String orgId);

    List<AgentFinanceCompanyNum> agentFinanceCompany(AgentFinanceCompanyParam param);

    List<AgentFinanceCompanyNum> agentFinanceCompanyList(AgentFinanceCompanyParam param);

    List<AgentFinanceCompanyVO> agentList(AgentFinanceCompanyParam param);

    List<AgentFinanceCompanyVO> agentWarehouseList(AgentFinanceCompanyParam param);

    List<AgentFinanceWarehouseVO> warehouseList(AgentFinanceCompanyParam param);

    List<AgentFinanceCompanyNum> agentFinanceWarehouse(AgentFinanceCompanyParam param);

    List<AgentFinanceCompanyNum> agentFinanceWarehouseList(AgentFinanceCompanyParam param);

    /**
     *代理商客户终端销售明细
     *
     * @param salesOutDetailVO
     * @return
     */
    List<AgentSalesOutDetailVO> listAgentClientSalesDetails(AgentSalesOutDetailVO salesOutDetailVO);

    List<AgentSalesOutDetailVO> listAgentClientSalesDetails4Export(AgentSalesOutDetailVO salesOutDetailVO);

    /**
     * 查询数量
     *
     * @param salesOutDetailVO
     * @return
     */
    Integer countAgentClientSalesDetails(AgentSalesOutDetailVO salesOutDetailVO);

    /**
     *代理商客户终端销售明细-铲运
     *
     * @param salesOutDetailVO
     * @return
     */
    List<AgentSalesOutDetailVO> listAgentClientSalesDetails4Cy(AgentSalesOutDetailVO salesOutDetailVO);

    /**
     * 销售明细查询数量-铲运
     *
     * @param salesOutDetailVO
     * @return
     */
    Integer countAgentClientSalesDetails4Cy(AgentSalesOutDetailVO salesOutDetailVO);

    /**
     * 销售明细查询导出-铲运
     *
     * @param salesOutDetailVO
     * @return
     */
    List<AgentSalesOutDetailVO> listAgentClientSalesDetails4CyExport(AgentSalesOutDetailVO salesOutDetailVO);

    /**
     * 客户订单提报统计
     * @param queryVO
     * @return
     */
    List<CustomerOrderStatementVO> getCustomerOrderStatementList(CustomerOrderStatementQueryVO queryVO);

    /**
     * 发货跟踪报表
     * @param filters
     * @return
     */
    List<DeliveryTrackingReportVO> getdeliveryTrackingReportList(DeliveryTrackingReportQueryVO filters);
    List<DeliveryTrackingReportVO> getdeliveryTrackingReportListV2(DeliveryTrackingReportQueryVO filters);

    /**
     * 订单情况报表-总体满足率
     * @param filters
     * @return
     */
    List<ContentPercentTotalReportVO> getContentPercentTotalReportList(DeliveryTrackingReportQueryVO filters);

    /**
     * 订单情况报表-按代理商统计满足率
     * @param filters
     * @return
     */
    List<ContentPercentAgentReportVO> getContentPercentAgentReportList(DeliveryTrackingReportQueryVO filters);

    /**
     * 订单情况报表-按零件统计满足率
     * @param filters
     * @return
     */
    List<ContentPercentMaterialReportVO> getContentPercentMaterialReportList(DeliveryTrackingReportQueryVO filters);

    /**
     * 直投采购分析
     * @param filters
     * @return
     */
    List<DirectPurchaseAnalyseReportVO> directPurchaseAnalyseReports(DeliveryTrackingReportQueryVO filters);

    /**
     * 总体销售情况报表-明细数据
     * @param filters
     * @return
     */
    List<OverallSalesReportVO> getOverAllSalesDetailReports(DeliveryTrackingReportQueryVO filters);

    /**
     * 总体销售情况报表-按代理商汇总
     * @param filters
     * @return
     */
    List<OverallSalesReportVO> getOverAllSalesAgentReports(DeliveryTrackingReportQueryVO filters);

    /**
     * 总体销售情况报表-按零件汇总
     * @param filters
     * @return
     */
    List<OverallSalesReportVO> getOverAllSalesMaterialReports(DeliveryTrackingReportQueryVO filters);

    /**
     * 总体销售情况报表-按零件分类汇总
     * @param filters
     * @return
     */
    List<OverallSalesReportVO> getOverAllSalesMaterialTypeReports(DeliveryTrackingReportQueryVO filters);

    /**
     * 总体销售情况报表-按订单类型
     * @param filters
     * @return
     */
    List<OverallSalesReportVO> getOverAllSalesOrderTypeReports(DeliveryTrackingReportQueryVO filters);

    /**
     *代理商库存统计
     * @param filters
     * @return
     */
    List<DlsInventoryVO> dlsInventory(@Param("wrap") DlsInventoryQueryVO filters);

    /**
     * 服务站库存统计
     * @param filters
     * @return
     */
    List<FwzInventoryVO> fwzInventory(@Param("wrap") FwzInventoryQueryVO filters);

    String getZwDeptId(String name);

    String getDeptId(String deptId);

    List<String> getCodeList(String deptId);

    List<DlsDrpVO> dlsDrp(@Param("wrap") DlsDrpQueryVO filters);

    List<FwzDrpVO> fwzDrp(@Param("wrap") FwzDrpQueryVO filters);


}